//package compose.project.demo
//
//import androidx.compose.foundation.background
//import androidx.compose.foundation.layout.Column
//import androidx.compose.foundation.layout.fillMaxHeight
//import androidx.compose.foundation.layout.fillMaxWidth
//import androidx.compose.foundation.layout.padding
//import androidx.compose.foundation.shape.RoundedCornerShape
//import androidx.compose.material.Button
//import androidx.compose.material.ModalBottomSheetLayout
//import androidx.compose.material.ModalBottomSheetValue
//import androidx.compose.material.Text
//import androidx.compose.material.rememberModalBottomSheetState
//import androidx.compose.runtime.Composable
//import androidx.compose.runtime.mutableStateOf
//import androidx.compose.runtime.remember
//import androidx.compose.runtime.rememberCoroutineScope
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.graphics.Color
//import androidx.compose.ui.unit.dp
//import kotlinx.coroutines.launch
//import org.example.project.search.data.RecordData
//
//@Composable
//fun BottomModalSheetExample() {
//    val types = listOf("美食", "酒店", "景点", "加油站", "超市", "更多")
//    val records = listOf(
//        RecordData(
//            name = "天安门东(公交站)",
//            station = listOf("52路", "1路", "夜1路", "夜景观光线", "120路", "52路"),
//            type = 23
//        ),
//        RecordData(name = "大钟寺(地铁站)", station = listOf("13号线", "12号线"), type = 21),
//        RecordData(name = "Coco都可", address = "北京市朝阳区国奥中心xxxxxx", type = 16),
//        RecordData(name = "天安门", address = "北京市朝阳区国奥中心xxxxxx"),
//        RecordData(
//            name = "黄渠村(公交站)",
//            station = listOf("499路", "675路", "911路", "517路"),
//            type = 23
//        ),
//        RecordData(name = "地铁13号线", showName = "东直门--西直门", type = 22),
//        RecordData(name = "499路", showName = "燕莎桥南--草房西路南口", type = 24),
//    )
//    val list = remember { mutableStateOf(records) }
//    val sheetState =
//        rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.HalfExpanded)
//
//    val coroutineScope = rememberCoroutineScope()
//
//    ModalBottomSheetLayout(
//        sheetState = sheetState,
//        sheetContent = {
//            // 抽屉内容
//            Column(
//                modifier = Modifier
//                    .fillMaxWidth()
//                    .fillMaxHeight()
//                    .background(color = Color(0xfff1f3f5))
//                    .padding(start = 12.dp, top = 8.dp, end = 12.dp, bottom = 8.dp),
//            ) {
////                SearchCard("", types, {})
////                HistoryRecordCard(list)
//            }
//        },
//        sheetElevation = 16.dp, // 抽屉阴影高度
//        sheetShape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp),
//        sheetBackgroundColor = Color.White, // 抽屉背景色
//        modifier = Modifier.fillMaxWidth(),
//        content = {
//            // 主内容
//            Button(onClick = {
//                list.value += RecordData(name = "测试地点", type = 9)
//                coroutineScope.launch { sheetState.show() }
//            }) {
//                Text("Show Bottom Sheet")
//            }
//        },
//    )
//}